div(ng-controller="CypherResultCtrl", fullscreen)
  .outer
    include partials/frame-common-actions
    .left-frame-toggle
      .left-toggle-menu.toggle(ng-if='frame.type == "cypher" && availableModes.length > 0')
        .btn-group.toggle-buttons
          .button-holder(ng-show="isAvailable('graph')")
            button.btn(ng-class='{active: isActive("graph")}', ng-click='setActive("graph")')
              i.nf.nf-logo
              span.mini-menu-item-text Graph
            br
          .button-holder(ng-show="isAvailable('table')")
            button.btn(ng-class='{active: isActive("table")}', ng-click='setActive("table")')
              i.fa.fa-table
              span.mini-menu-item-text Rows
            br
          .button-holder(ng-show="isAvailable('text')")
            button.btn(ng-class='{active: isActive("text")}', ng-click='setActive("text")')
              i.fa.fa-font
              span.mini-menu-item-text Text
            br
          .button-holder(ng-show="isAvailable('plan')")
            button.btn(ng-class='{active: isActive("plan")}', ng-click='setActive("plan")')
              i.fa.fa-code-fork
              span.mini-menu-item-text Plan
            br
          .button-holder(ng-show="isAvailable('errors')")
            button.btn(ng-class='{active: isActive("errors")}', ng-click='setActive("errors")')
              i.fa.fa-file-text-o
              span.mini-menu-item-text Errors
            br
          .button-holder(ng-show="isAvailable('messages')")
            button.btn(ng-class='{active: isActive("messages")}', ng-click='setActive("messages")')
              i.fa.fa-exclamation-triangle
              span.mini-menu-item-text Warn
            br
          .button-holder
            button.btn(ng-class='{active: isActive("raw")}', ng-click='setActive("raw")')
              i.fa.fa-code
              span.mini-menu-item-text Code
    .right-inner-frame.no-indicator(ng-class='{"no-left-menu": frame.type != "cypher" || availableModes.length < 1}')
      .inner
        .view-result(ng-class='{error: frame.hasErrors}')
          .view-result-graph(ng-show='isActive("graph" )&& !frame.isTerminating', ng-controller="InspectorCtrl")
            article.help.no-data(ng-show='!isAvailable("graph")')
              p
                | No graph view available. You have to&nbsp;
                a(help-topic="RETURN")
                  | RETURN
                | &nbsp; nodes, relationships or paths to see a graph visualization.
            .graph-holder.result(ng-show='isAvailable("graph")', ng-class="{'one-legend-row': hasLabels || hasTypes, 'two-legend-rows': hasLabels && hasTypes}")
              include partials/legend
              .frame-notifications(ng-controller="FrameNotificationCtrl")
                .repeater(ng-repeat="notification in notifications | orderBy:'$$id':true")
                  .animation-layer(ng-class="{closing: notification.$$is_closing}")
                    .table-wrapper
                      .frame-notification(class="notif-{{notification.type}}", ng-click="notification.fn()")
                        p {{notification.message}}
                        .close-notification
                          a.fa.fa-times-circle(ng-click="close(notification); $event.stopPropagation();")
              .graph-contents
                svg.graph(neo-graph
                  graph-data='frame.response.graph'
                  on-item-click='onItemClick($item, "graphItem")'
                  on-item-mouse-over='onItemHover($item, "graphItem")'
                  on-item-mouse-out='onItemHover()'
                  on-node-drag-toggle='onNodeDragToggle($item)'
                  on-canvas-clicked='onItemClick()'
                  ng-controller='D3GraphCtrl'
                  style="pointer-events:fill;")

                .zoom-holder(ng-show='isFullScreen()')
                  button.zoom_in.faded
                    i.sl.sl-zoom-in
                  button.zoom_out
                    i.sl.sl-zoom-out

            .status-bar(ng-show='true')
              //- isActive("graph")')
              //- .cell
              .status
                include partials/inspector

          .view-result-table.result(ng-show='isActive("table") && !frame.isTerminating')
            .table-holder
              article.help.no-data.has-status-bar(ng-show='!frame.response.table._response.columns.length')
                p(ng-show="getNonZeroStatisticsFields(frame).length")
                  {{formatStatisticsOutput(updatesStatistics(frame))}}
                p(ng-show="!getNonZeroStatisticsFields(frame).length")
                  | (no changes, no rows)
              article.help.no-data.has-status-bar(ng-show='!frame.response.table._response.data.length && frame.response.table._response.columns.length')
                p
                  | (no rows)
              neo-table(table-data='frame.response.table', ng-show='frame.response.table._response.data.length')
            .status-bar
              .status
                include partials/result-status

          .view-result-table.result.ascii-result-table(ng-show='isActive("text")')
            .table-holder
              article.help.no-data.has-status-bar
                pre.ascii-table(ng-bind='ascii')
            .status-bar
              .status
                include partials/result-status

          .view-result-plan.result(ng-show='isActive("plan") && !frame.isTerminating')
            .plan-holder
              article.help.no-data.has-status-bar(ng-show='!isAvailable("plan")')
                p No plan found. Prepend your query with EXPLAIN or PROFILE to analyze the execution plan.
              .query-plan-contents(ng-show='isAvailable("plan")')
                svg.query-plan(neo-plan
                  query-plan='frame.response.table._response.plan')
            .status-bar
              .status
                include partials/plan-status

          .view-result-raw.result(ng-show='isActive("raw") && !frame.isTerminating')
            .raw-holder
              article.help.no-data.has-status-bar(ng-show='!isAvailable("raw")')
                p No raw data found.
              .raw-contents.clearfix(ng-show='isAvailable("raw") &&  frame.response.protocol == "bolt"')
                .request-card.bolt-contents
                  h4 Request through Bolt
                  .frame-card
                    p.lead.div-toggler Statement
                    .frame-card-contents
                      table.table.data
                        tbody
                          tr
                            td Parameters
                            td {{JSON.stringify(frame.response.raw.summary.statement.parameters)}}
                          tr
                            td Text
                            td {{frame.response.raw.summary.statement.text}}
                  h4 Response through Bolt
                  .frame-card
                    p.lead.div-toggler Response
                    .frame-card-contents
                      table.table.data
                        tbody
                          tr
                            td Data
                            td
                              div
                                pre(output-raw="frame.response.raw", override-size-limit="true")
                          tr
                            td statementType
                            td {{frame.response.raw.summary.statementType}}
              .raw-contents.clearfix(ng-show='isAvailable("raw") &&  frame.response.protocol != "bolt"')
                .request-card(ng-repeat="(index, request) in frame.requests")
                  h4 {{ getRequestTitle(frame.requests.length, index) }}
                  .frame-card
                    p.lead.div-toggler General
                    .frame-card-contents
                      general-request-table(table-data="request.raw.request")
                  .frame-card
                    p.lead.div-toggler Request
                    .frame-card-contents
                      headers-table(table-data="request.raw.request.headers")
                      h5 Payload
                      pre(output-raw="request.raw.request.data")
                  .frame-card
                    p.lead.div-toggler Response
                    .frame-card-contents
                      headers-table(table-data="request.raw.response.headers")
                      h5 Data
                      pre(output-raw="request.raw.response.data", override-size-limit="true")
            include partials/error-status-bar
            .status-bar(ng-show="!frame.hasErrors")
              .status
                include partials/raw-status

          .view-result-error.result.with-frame-menu(ng-show='isActive("errors")')
            .error-holder
              article.help.no-data.has-status-bar
                pre.frame-error(ng-bind="frame.detailedErrorText")
            include partials/error-status-bar

          .view-result-messages.result.with-frame-menu(ng-show='isActive("messages")')
            .messages-holder
              article.help.no-data.has-status-bar
                .cypher-messages(ng-repeat="(index, message) in frame.response.notifications")
                  .cypher-message(class="cypher-message-{{message.severity | lowercase}}")
                    | {{message.severity}}
                  h4
                    {{message.title}}
                  p {{message.description}}
                  pre(cypher-hint="message", cypher-input="{{frame.input}}")
                  hr(ng-show="!$last")
            include partials/messages-status-bar

          .view-result-loading(ng-show='frame.isLoading && !frame.isTerminating')
            .spinner
              span.fa.fa-spinner.fa-spin.fa-2x
            .status-bar
              .status
                span Running...

          .view-result-loading(ng-show='frame.isTerminating')
            .spinner
              span.fa.fa-spinner.fa-spin.fa-2x
            .status-bar
              .status
                span Terminating...
